import plugin from '../../../lib/plugins/plugin.js'
import puppeteer from "../../../lib/puppeteer/puppeteer.js";

export class PokemonHelp extends plugin {
  constructor() {
    super({
      name: '宝可梦帮助',
      dsc: '提供宝可梦攻略查询的帮助信息',
      event: 'message',
      priority: 5000,
      rule: [
        {
          reg: "^#?(宝可梦帮助)",
          fnc: 'help'
        },
      ]
    });
  }
	async help(e) {
    let cwd = `${process.cwd()}/plugins/Pokemon-Plugin/html/help`
    cwd = cwd.replace(/\\/g,'/')

    let data = {
      quality:100,
      tplFile:`./plugins/Pokemon-Plugin/html/help/help.html`,
      鸡鸡地址:cwd
    }
    let img = await puppeteer.screenshot("PokemonHelp", {
      ...data,
    })
    e.reply(img)
	}

}